interface Storage {
    key: string,
    value: string
}

export const sessionSet = ({key, value}: Storage) => {
    sessionStorage.setItem(key, JSON.stringify(value))
}
export const sessionGet = (key: string) => {
    const value = sessionStorage.getItem(key)
    if (!value) return null
    return JSON.parse(value)
}
export const sessionDelete = (key: string) => {
    sessionStorage.removeItem(key)
}